# NEVER EDIT this file.  It was generated and will be overwritten without
# notice upon regeneration of this application.  You have been warned.
package Apps::Checkbook::Model::trans;
use strict; use warnings;

Apps::Checkbook::Model::trans->table   ( 'trans'     );
Apps::Checkbook::Model::trans->sequence( 'trans_seq' );
Apps::Checkbook::Model::trans->columns ( Primary   => qw/
    id
/ );

Apps::Checkbook::Model::trans->columns ( All       => qw/
    id
    status
    trans_date
    amount
    payee_payor
    descr
    foreigner
/ );

Apps::Checkbook::Model::trans->columns ( Essential => qw/
    id
    status
    trans_date
    amount
    payee_payor
    foreigner
/ );

Apps::Checkbook::Model::trans->has_a( status => 'Apps::Checkbook::Model::status' );
Apps::Checkbook::Model::trans->has_a( payee_payor => 'Apps::Checkbook::Model::payee' );
Apps::Checkbook::Model::trans->has_a( foreigner => 'Apps::Checkbook::Model::sch_name' );

sub get_foreign_display_fields {
    return [ qw( id ) ];
}

sub get_foreign_tables {
    return qw(
        Apps::Checkbook::Model::status
        Apps::Checkbook::Model::payee
        Apps::Checkbook::Model::sch_name
    );
}

sub foreign_display {
    my $self = shift;

    my $id = $self->id() || '';

    return "$id";
}

1;

=head1 NAME

Apps::Checkbook::Model::GEN::trans - model for trans table (generated part)

=head1 DESCRIPTION

This model mixes into Apps::Checkbook::Model::trans,
because Class::DBI bindings don't really allow a choice.
It was generated by Bigtop, and IS subject to regeneration.

=head1 METHODS

You may use all normal Class::DBI::Sweet methods and the ones listed here:

=over 4

=item get_foreign_display_fields

=item get_foreign_tables

=item foreign_display

=back

=cut
